<?php
    
    include '../public/db_object.php';
    
    if(isset($_POST)){
        $table = $_POST['table'];
        $id_name = $_POST['id_name'];
        $id = $_POST['id'];
        //echo $id_name;
        //echo $id;
        //exit;
        $db = new DB_object(['db_name'=> 'db_shop']);

        $ret = $db->l_delete_one($table, $id_name.'='.$id);

        if($ret){
            echo 1;
        }else{
            echo 0;
        }

    }
    


?>